//
//  aboutMeAndUAndDaZiViewController.m
//  OrangeNote
//
//  Created by Vandals on 16/1/28.
//  Copyright © 2016年 崇龙. All rights reserved.
//

#import "aboutMeAndUAndDaZiViewController.h"

#define dazhiXXX [UIScreen mainScreen].bounds.size.width
#define dazhiYYY [UIScreen mainScreen].bounds.size.height
@interface aboutMeAndUAndDaZiViewController ()
@property(nonatomic,strong)UIScrollView *scrollVieww;

@end

@implementation aboutMeAndUAndDaZiViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.navigationItem.titleView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"biaotilan"]];

    self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"333.jpg"]];
    UIView *vieww = [[UIView alloc]initWithFrame:CGRectMake(0, 0, dazhiXXX, dazhiYYY)];
//    [self.view addSubview:vieww];
    
    UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(dazhiXXX/2 - 30, dazhiYYY/2 - 60, 60, 30)];
    label.text = @"作者:";
    label.textAlignment = NSTextAlignmentCenter;
    [vieww addSubview:label];
    
    UILabel *label2 = [[UILabel alloc]initWithFrame:CGRectMake(dazhiXXX/2 - 30, dazhiYYY/2 - 30, 60, 30)];
    label2.text = @"刘崇龍";
    label2.textAlignment = NSTextAlignmentCenter;
    [vieww addSubview:label2];
    
    UILabel *label3 = [[UILabel alloc]initWithFrame:CGRectMake(dazhiXXX/2 - 30, dazhiYYY/2, 60, 30)];
    label3.text = @"法特";
    label3.textAlignment = NSTextAlignmentCenter;
    [vieww addSubview:label3];
    
    UILabel *label4 = [[UILabel alloc]initWithFrame:CGRectMake(dazhiXXX/2 - 30, dazhiYYY/2 + 30, 60, 30)];
    label4.text = @"王恒治";
    label4.textAlignment = NSTextAlignmentCenter;
    [vieww addSubview:label4];
    
    UILabel *label5 = [[UILabel alloc]initWithFrame:CGRectMake(dazhiXXX/2 - 40, dazhiYYY/2 + 80, 80, 30)];
    label5.text = @"工作邮箱:";
    label5.textAlignment = NSTextAlignmentCenter;
    [vieww addSubview:label5];
    
    UILabel *label6 = [[UILabel alloc]initWithFrame:CGRectMake(dazhiXXX/2 - 100, dazhiYYY/2 + 120, 200, 30)];
    label6.text = @"arfa@vip.qq.com";
    label6.textAlignment = NSTextAlignmentCenter;
    [vieww addSubview:label6];
    
    
    
    self.scrollVieww = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, dazhiXXX, dazhiYYY)];
    self.scrollVieww.contentSize = CGSizeMake(dazhiXXX, dazhiYYY*2);
    self.scrollVieww.scrollEnabled = NO;
    UIView *viewwwwww = [[UIView alloc]initWithFrame:CGRectMake(0, 0, dazhiXXX, dazhiYYY)];
    
    
    [self.scrollVieww addSubview:viewwwwww];
    [self.scrollVieww addSubview:vieww];
    
    [NSTimer scheduledTimerWithTimeInterval:0.1f target:self selector:@selector(scrollTimerrr) userInfo:nil repeats:YES];
    [self.view addSubview:self.scrollVieww];


    
    
    
    
    
    
    
    
}
// timer轮播方法
CGFloat myNumber = 0;
-(void)scrollTimerrr{
    myNumber += 0.5;
    _scrollVieww.contentOffset = CGPointMake(0, myNumber);
    if (myNumber == dazhiYYY*2) {
        _scrollVieww.contentOffset = CGPointMake(0, 0);
        myNumber = 0;
    }
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
